class CreateEmployees < ActiveRecord::Migration
  def self.up
	create_table :employees, :primary_key => :id do |t|
		t.integer	:id
		t.string	:username,			:null => false
		t.string  :first_name,     :null => false
		t.string  :last_name,     :null => false
		t.datetime	:date_added
		t.integer	:created_by
		t.text		:other_info
		t.string	:phone
		t.string	:email
		t.string	:hashed_password,	:null => false
		t.string	:salt,				:null => false
		t.boolean	:is_manager,		:default => 0
    end
	Employee.create :id => 1,
					:username => "admin",
					:first_name => "Administrative",
					:last_name => "Account",
					:hashed_password => "145e01b83dccdfc92bce933fa107c5684d429a41",
					:salt => "701914399474400.820197936954052",
					:is_manager => 1,
					:date_added => Date.new(Time.now.year,Time.now.month,Time.now.day),
					:email => "admin@admin.com"
  end

  def self.down
    drop_table :employees
  end
end

